package com.cnunicom.service.impl;

import com.cnunicom.dao.ProductDao;
import com.cnunicom.domain.Product;
import com.cnunicom.service.ProductService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: dingziyuan
 * @Date: 2020/4/4/004 21:14
 * @Description: *
 */
@Service
public class ProductServiceImpl implements ProductService {

    @Resource
    private ProductDao productDao;

    @Override
    public Product findByPid(Integer pid) {
        return productDao.findById(pid).orElse(null);
    }
}
